<!-- 酒币消费记录-用户 -->
<div class="search">
  <nz-select style="width:300px;" [(ngModel)]="source" nzAllowClear nzPlaceHolder="记录类型" (ngModelChange)="searchData()">
    <nz-option *ngFor="let item of sourcelist" [nzValue]="item.key" [nzLabel]="item.value"></nz-option>
  </nz-select>
  交易日期:
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="starttime" nzPlaceHolder="开始日期">
  </nz-date-picker>
  ~
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="endtime" nzPlaceHolder="结束日期">
  </nz-date-picker>
  <a (click)="searchData()">查询</a>
</div>

<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading" [nzTotal]="total" 
  [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize" (nzPageIndexChange)="searchData()"
  (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'900px',y: '400px' }" [nzFooter]="footerTemplate">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="150px">用户昵称</th>
      <th nzWidth="200px">商户名称</th>
      <th nzWidth="150px">订单号</th>
      <th nzWidth="80px">交易前酒币数</th>
      <th nzWidth="80px">交易酒币数</th>
      <th nzWidth="80px">交易后酒币数</th>
      <th nzWidth="80px">交易类型</th>
      <th nzWidth="160px">交易时间</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td>{{data.nickname}}</td>
      <td>{{data.mername}}</td>
      <td>{{data.ordercode}}</td>
      <td>{{data.originwine}}</td>
      <td>{{data.conins}}</td>
      <td>{{data.coinbalance}}</td>
      <td>{{data.source}}</td>
      <td>{{data.updateTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
    </tr>
  </tbody>
</nz-table>

<ng-template #footerTemplate let-footer>
  {{footTotal}}
</ng-template>
<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>